package pojo;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
 * User entity. @author MyEclipse Persistence Tools
 */

public class User implements java.io.Serializable {

	// Fields

	private Integer id;
	private Userinfo userinfo;
	private String username;
	private String password;
	private Date lastlogin;
	private Set messagesForSender = new HashSet(0);
	private Set messagesForReceiver = new HashSet(0);
	private Set goods = new HashSet(0);
	private Set collects = new HashSet(0);

	// Constructors

	/** default constructor */
	public User() {
	}

	/** minimal constructor */
	public User(String username, String password) {
		this.username = username;
		this.password = password;
	}

	/** full constructor */
	public User(Userinfo userinfo, String username, String password,
			Date lastlogin, Set messagesForSender, Set messagesForReceiver,
			Set goods, Set collects) {
		this.userinfo = userinfo;
		this.username = username;
		this.password = password;
		this.lastlogin = lastlogin;
		this.messagesForSender = messagesForSender;
		this.messagesForReceiver = messagesForReceiver;
		this.goods = goods;
		this.collects = collects;
	}

	// Property accessors

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Userinfo getUserinfo() {
		return this.userinfo;
	}

	public void setUserinfo(Userinfo userinfo) {
		this.userinfo = userinfo;
	}

	public String getUsername() {
		return this.username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Date getLastlogin() {
		return this.lastlogin;
	}

	public void setLastlogin(Date lastlogin) {
		this.lastlogin = lastlogin;
	}

	public Set getMessagesForSender() {
		return this.messagesForSender;
	}

	public void setMessagesForSender(Set messagesForSender) {
		this.messagesForSender = messagesForSender;
	}

	public Set getMessagesForReceiver() {
		return this.messagesForReceiver;
	}

	public void setMessagesForReceiver(Set messagesForReceiver) {
		this.messagesForReceiver = messagesForReceiver;
	}

	public Set getGoods() {
		return this.goods;
	}

	public void setGoods(Set goods) {
		this.goods = goods;
	}

	public Set getCollects() {
		return this.collects;
	}

	public void setCollects(Set collects) {
		this.collects = collects;
	}

}